class MyArray <e>{
    public Object[] array = new Object[10];
    public e getPos(int pos) {
        return (e)this.array[pos];
    }
    public void setVal(int pos,e val) {
        this.array[pos] = val;
    }
}
public class TestDemo {
    public static void main(String[] args) {
        MyArray <Integer>myArray = new MyArray<Integer>();
        myArray.setVal(0,10);
        myArray.setVal(1,20);
        int ret = myArray.getPos(1);
        System.out.println(ret);
    }
}